<#include "admin/template/page/head_lib.html">
	<body>
	<div class="layui-fluid">

		<form class="layui-form">
			<input type="hidden" name="form_id" value="${params.form_id}">
			<input type="hidden" name="site_id" value="${session.site.site_id}">
			<input type="hidden" name="column_id" value="${params.column_id}">
			<#list  result as data >
				<div class="layui-form-item">
					<label class="layui-form-label">${data.field_desc}</label>
					<div class="<#if data.field_type == 'image' || data.field_type == 'file'>layui-input-inline <#else> layui-input-block </#if>"  >
						<#if data.field_type == 'select'>
							<select class="sykSelect"  name="${data.field_name}"
							  dict_type="dict" dict="${data.field_dict}" addNull="1"
							<#if data.id?exists>  lay-filter="${data.id}"  childrenSelectId="${data.id}" </#if>
							<#if data.field_name?exists>  select_name="${data.field_name}"   </#if>
							<#if data.field_verification?exists> required="" lay-verType="msg" lay-verify="${data.field_verification}"</#if>
							<#if data.is_required?exists> required="" lay-verType="msg" lay-verify="required" </#if>
							<#if data.dict == "">
								<#list data.option as options>
									<option value="${options.value}">${options.label}</option>
								</#list>
							</#if>
							</select>
						<#elseif data.field_type == 'image' || data.field_type == 'file'>
							<div class="layui-input-inline">
								<input <#if data.field_verification?exists> required="" lay-verType="msg" lay-verify="${data.field_verification}"</#if>
								<#if data.is_required?exists> required="" lay-verType="msg" lay-verify="required" </#if>

										type="text" id="filePath" name="${data.field_name}" autocomplete="off" disabled="disabled" class="layui-input"/>
							</div>

						<#elseif data.field_type == 'edit' >
						 <textarea id="${data.field_name}" name="${data.field_name}"  placeholder="${item.placeholder}"
								   class="sykLayedit" height="400" width="400"></textarea>
						<#elseif data.field_type == 'datetime' >
							<input type="text" name='${data.field_name}'  datetype="datetime"
							<#if data.field_verification?exists> required="" lay-verType="msg" lay-verify="${data.field_verification}"</#if>
							<#if data.is_required?exists> required="" lay-verType="msg" lay-verify="required" </#if>
							placeholder="${data.placeholder}" autocomplete="off" class="layui-input sykDate">

						<#elseif data.field_type == 'radio' >
						<#else>
							<input type="${data.field_type}" name="${data.field_name}"
							<#if data.field_verification?exists> required="" lay-verType="msg" lay-verify="${data.field_verification}"</#if>
							<#if data.is_required?exists> required="" lay-verType="msg" lay-verify="required" </#if>
								   value="${data.field_default_value}"  placeholder="${data.field_default_value}" autocomplete="off" class="layui-input"/>
						</#if>
					</div>
					<#if data.field_type == 'image' || data.field_type == 'file'>
					<div class="layui-input-inline">
						<button type="button"  class="layui-btn" function="upload" fileElem="#filePath" fileAccept="file" fileExts="" fileSize="${item.file_size!'1024'}" inputs="${item.inputs!'type:test'}">${time.title!'上传'}</button>
					</div>
					</#if>
				</div>
			</#list>
			<hr/>
			<div class="layui-form-item" style="text-align: center;">
				<button class="layui-btn" lay-submit="" lay-filter="save" url="cms/content/save.json">新增</button>
				<button type="button" class="layui-btn layui-btn-primary" function="close">关闭</button>
			</div>
		</form>
	</div>
	</body>
	</html>